home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / LISP Related / LISP Goodies / Wood / load-wood.lisp < prev    next >
Encoding:
Text File  |  1992-09-02  |  3.2 KB  |  89 lines  |  [TEXT/CCL2]

  1. ;;;-*- Mode: Lisp; Package: (WOOD) -*-
  2.  
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;;
  5. ;; load-wood.lisp
  6. ;; Load this file and evaluate (wood::load-wood)
  7. ;; You may need to edit the definition of the "wood" logical host.
  8. ;;
  9. ;; Copyright © 1992 Apple Computer, Inc. All rights reserved.
  10. ;; Permission is given to use, copy, and modify this software provided
  11. ;; that this copyright notice is attached to all derivative works.
  12. ;; This software is provided "as is". Apple makes no warranty or
  13. ;; representation, either express or implied, with respect to this software,
  14. ;; its quality, accuracy, merchantability, or fitness for a particular
  15. ;; purpose.
  16. ;;
  17.  
  18. ;;;;;;;;;;;;;;;;;;;;;;;;;;
  19. ;;
  20. ;; Modification History
  21. ;;
  22. ;; -------------- 0.5
  23. ;; 07/27/92 bill  Export all documented symbols.
  24. ;;
  25.  
  26. (defpackage :wood)
  27. (in-package :wood)
  28.  
  29. (export '(load-wood
  30.           open-pheap close-pheap with-open-pheap root-object flush-pheap
  31.           p-load p-store
  32.           p-make-area with-consing-area
  33.           p-cons p-list p-list-in-area p-make-list
  34.           p-make-uvector p-make-array p-vector
  35.           p-listp p-consp p-atom p-uvectorp p-packagep p-symbolp
  36.           p-stringp p-simple-string-p p-vectorp p-simple-vector-p p-arrayp
  37.           p-car p-cdr p-caar p-cadr p-cdar p-cddr
  38.           p-caaar p-caadr p-cadar p-caddr p-cdaar p-cdadr p-cddar p-cdddr
  39.           p-caaaar p-caaadr p-caadar p-caaddr p-cadaar p-cadadr p-caddar p-cadddr
  40.           p-cdaaar p-cdaadr p-cdadar p-cdaddr p-cddaar p-cddadr p-cdddar p-cddddr
  41.           p-uvsize p-uvref p-svref p-%svref p-length p-aref
  42.           p-array-rank p-array-dimensions p-array-dimension
  43.           p-intern p-find-symbol p-find-package p-make-package
  44.           p-symbol-name p-symbol-package p-symbol-value
  45.           p-package-name p-package-nicknames
  46.           p-make-btree p-btree-lookup p-btree-store p-btree-delete
  47.           p-btree-clear p-map-btree
  48.           p-make-hash-table p-gethash p-remhash p-clrhash
  49.           p-hash-table-size p-maphash
  50.           wood-slot-names-vector wood-slot-value))
  51.  
  52. (setf (logical-pathname-translations "wood")
  53.       '(("**;*.*" "ccl:wood;**;*.*")))
  54.  
  55. (pushnew "wood:" *module-search-path* :test 'equalp)
  56.  
  57. (defun compile-if-needed (file &optional force)
  58.   (let ((lisp (merge-pathnames file ".lisp"))
  59.         (fasl (merge-pathnames file ".fasl")))
  60.     (when (or force
  61.               (not (probe-file fasl))
  62.               (> (file-write-date lisp) (file-write-date fasl)))
  63.       (compile-file lisp :verbose t))))
  64.  
  65. (defun compile-and-load (file &optional force-compile)
  66.   (compile-if-needed file force-compile)
  67.   (load file :verbose t))
  68.  
  69. (defparameter *wood-files*
  70.   '("block-io-mcl" "split-lfun" "disk-cache" "woodequ" "disk-cache-accessors"
  71.     "disk-cache-inspector" "persistent-heap" "btrees" "persistent-clos"
  72.     "recovery"))
  73.  
  74. (defun load-wood (&optional force-compile)
  75.   (with-compilation-unit ()
  76.     (compile-if-needed "wood:load-wood")
  77.     (dolist (file *wood-files*)
  78.       (compile-and-load (merge-pathnames file "wood:") force-compile))))
  79.  
  80. ; This should be called only after load-wood.
  81. ; It compiles the changed files
  82. (defun compile-wood ()
  83.   (with-compilation-unit ()
  84.     (compile-if-needed "wood:load-wood")
  85.     (dolist (file *wood-files*)
  86.       (compile-if-needed (merge-pathnames file "wood:")))))
  87.  
  88.  
  89.